package com.greenline.push.dal.pushcenter.impl;

import com.greenline.push.dal.base.BaseDAO;
import com.greenline.push.dal.pushcenter.CertConfigDAO;
import com.greenline.push.dal.pushcenter.dataobject.CertConfigDO;
import com.greenline.push.dal.query.CertConfigQuery;

public class CertConfigDAOImpl extends BaseDAO implements CertConfigDAO {

	@Override
	public Long insertCertConfig(CertConfigDO certConfig) {
		return (Long) super.getSqlMapClientTemplate().insert(
				"certConfig.insert", certConfig);
	}

	@Override
	public CertConfigDO getCertConfigById(Long id) {
		return (CertConfigDO) super.getSqlMapClientTemplate().queryForObject(
				"certConfig.find_by_id", id);
	}

	@Override
	public int update(CertConfigDO certConfig) {
		return super.getSqlMapClientTemplate().update("certConfig.update",
				certConfig);
	}

	@Override
	public CertConfigQuery listByQuery(CertConfigQuery query) {
		return (CertConfigQuery) super.listByQuery("certConfig.list_by_query",
				query);
	}

	@Override
	public int delete(Long id) {
		return super.getSqlMapClientTemplate().delete("certConfig.delete", id);
	}

}
